package com.designpatterns.templatemethodpattern;

public abstract class CaffeineBeverage {
    public final void make(){
        boilWater();
        brew();
        pourInCup();
        addCondiments();
    }

    /**
     * step1 烧水
     */
    public void boilWater(){
        System.out.println("1.烧水");
    }
    /**
     * step2 浸泡茶叶或冲泡咖啡
     */
    public abstract void brew();
    /**
     * step3 倒进杯子
     */
    public void pourInCup(){
        System.out.println("3.倒进杯子");
    }
    /**
     * step4 加调味料
     */
    public abstract void addCondiments();
}
